var https = require('https');

var options = {
  host: 'show.uyuntest.cn',
  port: 443,
  path: '/tenant/api/v1/user/details/view',
  method: 'GET',
  headers: {
    accept: 'application/json',
    cookie: 'lang=zh-CN; token=m7ORIwMX9x4S1JHsldiDT7qQKNywzIVBxXlzKonXnfJyjZwKR+k8B/wMIo+nBPSbBIBTEcPHCMinqkIhslSZgBqrkxXLvcGOWgByZ47rElQ=; userId=94baaadca64344d2a748dff88fe7159e; tenantId=94baaadca64344d2a748dff88fe7159e; grafana_sess=42c425fce1c2246a'
  },
  rejectUnauthorized: false
};

var req = https.request(options, function(res) {
  console.log(res.statusCode);
  console.log(res.headers['set-cookie'])
  res.on('data', function(d) {
    process.stdout.write(d);
  });
});
req.end();

req.on('error', function(e) {
  console.error(e);
});